package com.pet.server.ext.constants;

import java.util.HashMap;
import java.util.Map;


public class Status {
	public static enum Source{meituan,jd,taobao,tmall}
	public static enum ScoreType {
        sign("sign","签到"),
        activate("activate","激活");
        private String status,name;
        public static final Map<String, ScoreType> statusMap = new HashMap<String, ScoreType>();
		static {
			ScoreType[] statu = ScoreType.class.getEnumConstants();
		    for(ScoreType s:statu ) {
		    	statusMap.put(s.status.toString(), s);
		    }
	    }
        private ScoreType(String status,String name) {
            this.status = status;
            this.name=name;
        }
        public String toString(){
        	return this.status;
        }
        public String toName(){
        	return this.name;
        }
        public static ScoreType fromValue(String value) {
		    return statusMap.get(value);
	    }
        public static String valueToName(String value){
        	ScoreType s = ScoreType.fromValue(value);
  		  return null==s?value:s.toName();
  	    }
    }
	
	public static enum Event {
		tinqc("tinqc","体内驱虫"),
        tiwqc("tiwqc","体外驱虫"),
        yum("yum","疫苗"),
        kuangq("kuangq","狂犬"),
        zidy("zidy","自定义");
        private String status,name;
        public static final Map<String, Event> statusMap = new HashMap<String, Event>();
		static {
			Event[] statu = Event.class.getEnumConstants();
		    for(Event s:statu ) {
		    	statusMap.put(s.status.toString(), s);
		    }
	    }
        private Event(String status,String name) {
            this.status = status;
            this.name=name;
        }
        public String toString(){
        	return this.status;
        }
        public String toName(){
        	return this.name;
        }
        public static Event fromValue(String value) {
		    return statusMap.get(value);
	    }
        public static String valueToName(String value){
        	Event s = Event.fromValue(value);
  		  return null==s?value:s.toName();
  	    }
	}
	public static enum TaskType{normal,daily}
	//login,share_request,timeline_add;
	public static enum DailyTask {
		login("login","每日登陆",20,1),
		share_request("share_request","分享问答",20,1),
		share_article("share_article","分享文章",20,1),
		timeline_add("timeline_add","添加timeline",20,1);
        private String status,name;
        private Integer integral,time;
        public static final Map<String, DailyTask> statusMap = new HashMap<String, DailyTask>();
		static {
			DailyTask[] statu = DailyTask.class.getEnumConstants();
		    for(DailyTask s:statu ) {
		    	statusMap.put(s.status.toString(), s);
		    }
	    }
        private DailyTask(String status,String name,Integer integral,Integer time) {
            this.status = status;
            this.name=name;
            this.integral=integral;
        }
        public String toString(){
        	return this.status;
        }
        public String toName(){
        	return this.name;
        }
        
        public Integer getIntegral() {
			return integral;
		}
		public void setIntegral(Integer integral) {
			this.integral = integral;
		}
		public Integer getTime() {
			return time;
		}
		public void setTime(Integer time) {
			this.time = time;
		}
		public static DailyTask fromValue(String value) {
		    return statusMap.get(value);
	    }
        public static String valueToName(String value){
        	DailyTask s = DailyTask.fromValue(value);
  		  return null==s?value:s.toName();
  	    }
	}
	//	public Integer user_id,pet_add,view_product,view_article,share_app,share_miss,vote,request,answer,share_product;

	public static enum NormalTask {
		pet_add("pet_add","宠物添加",20,1),
		view_product("view_product","浏览商品",20,1),
		view_article("view_article","浏览文章",20,1),
		share_app("share_app","分享app",20,1),
		share_miss("share_miss","分享失踪宠物",20,1),
		share_adopt("share_adopt","分享领养宠物",20,1),
		vote("vote","发布投票",20,1),
		request("request","发布问答",20,1),
		answer("answer","回答3次",20,1),
		share_product("share_product","分享商品",20,1);
        private String status,name;
        private Integer integral,time;
        public static final Map<String, NormalTask> statusMap = new HashMap<String, NormalTask>();
		static {
			NormalTask[] statu = NormalTask.class.getEnumConstants();
		    for(NormalTask s:statu ) {
		    	statusMap.put(s.status.toString(), s);
		    }
	    }
        private NormalTask(String status,String name,Integer integral,Integer time) {
            this.status = status;
            this.name=name;
            this.integral=integral;
            this.time=time;
        }
        public String toString(){
        	return this.status;
        }
        public String toName(){
        	return this.name;
        }
        public Integer getIntegral() {
			return integral;
		}
		public void setIntegral(Integer integral) {
			this.integral = integral;
		}
		public Integer getTime() {
			return time;
		}
		public void setTime(Integer time) {
			this.time = time;
		}
		public static NormalTask fromValue(String value) {
		    return statusMap.get(value);
	    }
        public static String valueToName(String value){
        	NormalTask s = NormalTask.fromValue(value);
  		  return null==s?value:s.toName();
  	    }
	}
	
	public static void main(String[] args){
		DailyTask d = DailyTask.fromValue("login");
		System.out.println(d);
	}
}
